package com.jeesite.modules.enums;

public enum OrderTypeEnum {

    VIP_MEMBER("1", "VIP会员购买"),

    KC("2", "课程购买"),

    CHART("3", "聊天包购买");

    private String type;

    private String name;

    OrderTypeEnum(String type, String name) {
        this.type = type;
        this.name = name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public String getType() {
        return type;
    }

    public static OrderTypeEnum getOfType(String type) {
        OrderTypeEnum[] values = OrderTypeEnum.values();
        for (OrderTypeEnum value : values) {
            if (type.equals(value.getType())) {
                return value;
            }
        }
        return null;
    }
}
